﻿/**
* Application
* @author maze | guavestudios.com
* @version 0.1
*/

package  {

	import com.yahoo.astra.fl.charts.LineChart;
	import fl.controls.Slider;
	import fl.events.SliderEvent;
	import flash.display.Graphics;
	import flash.display.StageAlign;
	import flash.display.Sprite;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	
	[SWF(width="1024",height="800",backgroundColor='0xffffff',frameRate='30')]
	public class Application extends Sprite {
		
		//{ STATIC
		
		//}
		
		//{ MEMBERS
		private var graph:LineChart;
		private var sldGE:Slider;
		private var sldMwst:Slider;
		//}
		
		//{ GETTER-SETTER
		
		//}
		
		//{ EVENT DEFINITION
		
		//}
		
		//{ INIT
		public function Application() {
			
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			
			
			
			
			init();
		}
		private function init():void {
			
			//graphics.lineStyle(1, 0);
			//drawGraph();
			
			graph = new LineChart();
			
			graph.x = 70;
			addChild(graph);
			
			sldGE = new Slider();
			sldGE.y = 50;
			sldGE.minimum = 400;
			sldGE.maximum = 7000;
			sldGE.addEventListener(SliderEvent.CHANGE, slider_change);
			addChild(sldGE);
			
			sldMwst = new Slider();
			sldMwst.y = 100;
			sldMwst.minimum = 10;
			sldMwst.maximum = 90;
			sldMwst.addEventListener(SliderEvent.CHANGE, slider_change);
			addChild(sldMwst);
			
			drawGraph();
			
			addEventListener(Event.ENTER_FRAME, this_enterframe);
		}
		
		private function this_enterframe(e:Event):void {
			//drawGraph();
		}
		
		private function slider_change(e:SliderEvent):void {
			drawGraph();
		}
		//}
		
		//{ PUBLIC METHODS
		
		//}
		
		//{ OVERRIDEN METHODS
		
		//}
		
		//{ PRIVATE METHODS
		private function drawGraph():void {
			
		}
		//}
		
		//{ EVENT HANDLING
		
		//}
		
	}
	
}
